﻿@{
    string version = ViewBag.RulesVersion as string;
    int? rulesId = (int?)ViewBag.RuleSetID;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/admin.css")" rel="stylesheet" type="text/css" />
</head>
<body class="admin">
    <div class="page">
        <header>
            <div id="logo">
                <a href="/">Heroquest Character Pad</a>
            </div>
            <div id="beta">
                BETA <span>version 1.2</span>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>
            @if (rulesId.HasValue)
            {
            <div id="rulesversion">Rule version: <span>@Html.Raw(version)</span></div>
            }
            <nav>
                <ul id="menu">
                    <li>@Html.SubMenuLink("Home", "Index", "Home")</li>
                    <li>@Html.ActionLink("Admin Home", "Index", "Admin")</li>
                    <li>@Html.ActionLink("Users", "Index", "User")</li>
                    <li>@Html.ActionLink("Releases", "Index", "Release")</li>
                    @if (rulesId.HasValue)
                    {
                    <li>@Html.ActionLink("Skills", "Index", "Skill", new { ruleSetId = rulesId }, null)</li>
                    <li>@Html.ActionLink("Spells", "Index", "Spell", new { ruleSetId = rulesId }, null)</li>
                    <li>@Html.ActionLink("Invocations", "Index", "Invocation", new { ruleSetId = rulesId }, null)</li>
                    }
                </ul>
            </nav>
        </header>
        <section id="main">
            @RenderBody()
        </section>
        <footer>
            <a href="mailto:contact@hqpad.org.uk">contact us</a>
        </footer>
    </div>

    <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr.2.7.1.custom.js")" type="text/javascript"></script>

    @RenderSection("PageScripts");
</body>
</html>
